package tech.waterism.exception;

import com.alibaba.fastjson.JSONObject;
import lombok.Getter;

public class CustomException extends Exception {
    @Getter
    private JSONObject data;

    public CustomException() {
    }

    public CustomException(String message) {
        super(message);
    }

    public CustomException(JSONObject data) {
        super();
        this.data = data;
    }

    public CustomException(String message, JSONObject data) {
        super(message);
        this.data = data;
    }

    public CustomException(String message, Throwable cause, JSONObject data) {
        super(message, cause);
        this.data = data;
    }

    public CustomException(Throwable cause, JSONObject data) {
        super(cause);
        this.data = data;
    }

    protected CustomException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace,
                              JSONObject data) {
        super(message, cause, enableSuppression, writableStackTrace);
        this.data = data;
    }
}
